toJson method
Converts the job to a JSON-compatible map.
Implementation
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'queue': queue,
'status': status.name,
'attempts': attempts,
'maxRetries': maxRetries,
'createdAt': createdAt.toIso8601String(),
'finishedAt': finishedAt?.toIso8601String(),
'availableAt': availableAt?.toIso8601String(),
'lastError': lastError?.toString(),
};