returning a transaction from inside a task like this will result in the same as simply returning the transaction, i.e. wrapping a transaction into the task in this case is pointless ;)
You would only do it if there was something else within the task, beside the transaction, but there isn't anything there.
And what makes it worse - you are not using the context correctly, i.e. you are using db.task => db.tx() logic, instead of db.task(t) => t.tx().
https://github.com/bocoup/skillsbot/blob/master/src/services/sync-slack.js#L5
returning a transaction from inside a task like this will result in the same as simply returning the transaction, i.e. wrapping a transaction into the task in this case is pointless ;)
You would only do it if there was something else within the task, beside the transaction, but there isn't anything there.
And what makes it worse - you are not using the context correctly, i.e. you are using
db.task => db.tx()
logic, instead ofdb.task(t) => t.tx()
.