mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 21:34:24 +00:00
various small changes and fixes
This commit is contained in:
@@ -33,9 +33,19 @@ class TicketGenerator {
|
||||
this.events = events;
|
||||
} );
|
||||
this.runningTickets = {};
|
||||
db.getData( 'orders' ).then( orders => {
|
||||
for ( let order in orders ) {
|
||||
if ( orders[ order ][ 'processed' ] != 'true' ) {
|
||||
this.ticketQueue[ this.jobId ] = { 'order': orders[ order ][ 'order_name' ] };
|
||||
this.jobId += 1;
|
||||
}
|
||||
}
|
||||
if ( this.jobId > 0 ) {
|
||||
this.queueHandler();
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
// TODO: continue processing once back online
|
||||
generateTickets ( order ) {
|
||||
this.ticketQueue[ this.jobId ] = { 'order': order };
|
||||
this.runningTickets[ order.tok ] = 'processing';
|
||||
@@ -96,7 +106,6 @@ class TicketGenerator {
|
||||
} ).catch( error => {
|
||||
console.error( '[ PDF GENERATOR ] ERROR: ' + error );
|
||||
this.isRunning = false;
|
||||
// TODO: Add to FAILED db
|
||||
} );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user