{"action":"created","issue":{"url":"https://api.github.com/repos/nextflow-io/nextflow/issues/51","labels_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/51/comments","events_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/51/events","html_url":"https://github.com/nextflow-io/nextflow/issues/51","id":88988649,"number":51,"title":"Long living channel","user":{"login":"andremrsantos","id":589051,"avatar_url":"https://avatars.githubusercontent.com/u/589051?v=3","gravatar_id":"","url":"https://api.github.com/users/andremrsantos","html_url":"https://github.com/andremrsantos","followers_url":"https://api.github.com/users/andremrsantos/followers","following_url":"https://api.github.com/users/andremrsantos/following{/other_user}","gists_url":"https://api.github.com/users/andremrsantos/gists{/gist_id}","starred_url":"https://api.github.com/users/andremrsantos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andremrsantos/subscriptions","organizations_url":"https://api.github.com/users/andremrsantos/orgs","repos_url":"https://api.github.com/users/andremrsantos/repos","events_url":"https://api.github.com/users/andremrsantos/events{/privacy}","received_events_url":"https://api.github.com/users/andremrsantos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nextflow-io/nextflow/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-17T11:20:17Z","updated_at":"2015-06-17T20:12:03Z","closed_at":null,"body":"Recently, I have been working on a nextflow pipeline where I need to log all my output of 3 processes into a single file and I have to save the resulting files.\r\n\r\nTo attend this goal, I have build two Channels:\r\n\r\n* One to save the log\r\n* One to copy the files\r\n\r\n```\r\n\tqc_logger.subscribe { logger(it) }\r\n\tqc_copy.subscribe { copyFile(it, read_folder) }\r\n```\r\n\r\nI have to repeat the same code for every process.\r\n\r\nI have also tried to make a _long living channel_, but after the first process completed the channel was soon closed ignoring the output of others process.\r\n\r\nIs there any work around? or include support for a long living __Channel__?"},"comment":{"url":"https://api.github.com/repos/nextflow-io/nextflow/issues/comments/112933019","html_url":"https://github.com/nextflow-io/nextflow/issues/51#issuecomment-112933019","issue_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/51","id":112933019,"user":{"login":"andremrsantos","id":589051,"avatar_url":"https://avatars.githubusercontent.com/u/589051?v=3","gravatar_id":"","url":"https://api.github.com/users/andremrsantos","html_url":"https://github.com/andremrsantos","followers_url":"https://api.github.com/users/andremrsantos/followers","following_url":"https://api.github.com/users/andremrsantos/following{/other_user}","gists_url":"https://api.github.com/users/andremrsantos/gists{/gist_id}","starred_url":"https://api.github.com/users/andremrsantos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andremrsantos/subscriptions","organizations_url":"https://api.github.com/users/andremrsantos/orgs","repos_url":"https://api.github.com/users/andremrsantos/repos","events_url":"https://api.github.com/users/andremrsantos/events{/privacy}","received_events_url":"https://api.github.com/users/andremrsantos/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T20:12:03Z","updated_at":"2015-06-17T20:12:03Z","body":"To reduce code duplication. I created a closure for copy and log and apply it at the end of each process. You can check the work around at [this project](https://github.com/andremrsantos/next-pipes-lghm/blob/master/small-rna-miseq.nf).\r\n\r\nLooking forward for the next updates"}}