Exemplo n.º 1
0
def _handle_build_started_event(obj):
    global _building_count
    global _building_notification

    with _building_lock:
        if _building_count == 0:
            _building_notification = Notification("Building...")
            notifications.add(_building_notification)
        _building_count += 1
Exemplo n.º 2
0
def _handle_build_ended_event(obj):
    global _building_count
    global _building_notification

    with _building_lock:
        _building_count -= 1
        if _building_count == 0:
            notifications.remove(_building_notification)

    if obj['successful']:
        message = "Build '%s' succeeded, duration: %fs." % (obj['target'],
                                                            obj['duration'])
    else:
        message = "Build '%s' failed." % obj['target']

    print(message)
    notifications.add(Notification(message, 3))
Exemplo n.º 3
0
def _handle_run_event(obj):
    message = "Run duration: %fs." % obj['duration']
    notifications.add(Notification(message, 3))
Exemplo n.º 4
0
def _handle_exported_event(obj):
    print("Exported at %s." % obj['path'])
    notifications.add(Notification("Exported.", 5))
Exemplo n.º 5
0
def _handle_executable_built_event(obj):
    print("Executable compiled at %s." % obj['path'])
    size = obj['size']
    notifications.add(Notification("Executable size: %d." % size, 5))
Exemplo n.º 6
0
def _handle_error_event(obj):
    print("Server error: %s" % obj['message'])
    notifications.add(Notification("Error, see system console.", 5))