BookOps-CAT / NightShift

Copy cataloging bot
MIT License
7 stars 1 forks source link

Refactor tasks individual methods into single class task.Tasks #17

Closed klinga closed 2 years ago

klinga commented 2 years ago

I'd suggest turning this all into a class that can be instantiated with a db session, library, libraryId, etc. This makes it a bit easier to interact with since I believe that it is only called from a single file. It simplifies the calls then because for each method here the only parameter that would be passed in would be the array of resources. This should make maintenance easier in the future as well, otherwise this potentially exposes a bunch of methods needing to be changed individually if something basic changes above.

_Originally posted by @mwbenowitz in https://github.com/BookOps-CAT/NightShift/pull/14#discussion_r799848745_

klinga commented 2 years ago

done in f93446579ac3d6a5910cbae351552aac63a41012

klinga commented 2 years ago

submitted in PR #19