New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code has been fixed for swift 3. Fixed an issue for persistence. #28
base: master
Are you sure you want to change the base?
Conversation
…sks from being persisted.
Please enter the commit message for your changes. Lines starting
…e, queuePriority. Removed dependencyStrs and let the operation handle the dependency by itself.
This is great @RajaveluC! Let me check out the diff and why the travis build is failing. |
Deserializes tasks that were serialized (persisted) | ||
*/ | ||
open func loadSerializedTasks() { | ||
self.pause() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good!
for task in tasks { | ||
task.setupDependencies(tasks) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed? It's important to setup the dependencies.
@@ -158,8 +160,16 @@ public class SYNQueue : NSOperationQueue { | |||
super.addOperation(op) | |||
} | |||
|
|||
func addDeserializedTask(task: SYNQueueTask) { | |||
if tasksMap[task.taskID] != nil { | |||
open func start() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this and pause() should be open. What's a good argument for it?
func log(level: LogLevel, _ msg: String) { | ||
return ConsoleLogger.log(level, msg) | ||
} | ||
import Foundation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already imported above.
class func log(level: LogLevel, _ msg: String) { | ||
runOnMainThread { print("[\(level.toString().uppercaseString)] \(msg)") } | ||
public func log(_ level: LogLevel, _ msg: String) { | ||
print("[\(level.toString())] \(msg)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We lost the uppercase here.
Code has been fixed for swift 3. Fixed an issue that prevented the tasks from being persisted.