<commit_before>from apscheduler.scheduler import Scheduler
from apscheduler.jobstores.sqlalchemy_store import SQLAlchemyJobStore
import datetime
from time import sleep

JOBS_DATABASE = "postgresql://test_jobs:test_jobs@localhost/test_jobs"

# Start the scheduler
sched = Scheduler()
sched.add_jobstore(SQLAlchemyJobStore(url=JOBS_DATABASE, tablename='apscheduler_jobs'), 'default')
sched.start()

def print_reservation_id(reservation_id):
	print "====> Reservation id is " + str(reservation_id)


if __name__ == '__main__':

	print "====> Printing jobs..."
	print sched.print_jobs()
	 
	now = datetime.datetime.now()
	start_time =  now + datetime.timedelta(seconds=3)
	later = now + datetime.timedelta(seconds=10)

	print "====> now is " + str(now)
	print "====> start_time is " + str(start_time)
	print "====> later is " + str(later)


	reservation_id = 1

	job_name = "print_reservation_id_" + str(reservation_id)

	start_instance_job = sched.add_date_job(print_reservation_id, start_time, \
		name=job_name + '_start', args=[reservation_id])

	start_instance_job = sched.add_date_job(print_reservation_id, later, \
		name=job_name + '_start', args=[reservation_id])

	print "====> Reservation id should print in 3 seconds, sleeping..."

	sleep(3)

	print "====> Printing jobs..."
	print sched.print_jobs()<commit_msg>few more parts to test apscheduler sqlalchemy<commit_after>from apscheduler.scheduler import Scheduler
from apscheduler.jobstores.sqlalchemy_store import SQLAlchemyJobStore
import datetime
from time import sleep

JOBS_DATABASE = "postgresql://test_jobs:test_jobs@localhost/test_jobs"

# Start the scheduler
sched = Scheduler()
sched.add_jobstore(SQLAlchemyJobStore(url=JOBS_DATABASE, tablename='apscheduler_jobs'), 'default')
sched.start()

def print_reservation_id(reservation_id):
	print "====> Reservation id is " + str(reservation_id)


if __name__ == '__main__':

	print "====> Printing jobs..."
	print sched.print_jobs()
	 
	now = datetime.datetime.now()
	start_time =  now + datetime.timedelta(seconds=3)
	later = now + datetime.timedelta(seconds=10)

	print "====> now is " + str(now)
	print "====> start_time is " + str(start_time)
	print "====> later is " + str(later)


	reservation_id = 1

	job_name = "print_reservation_id_" + str(reservation_id)

	print "====> adding start_time job"

	start_instance_job = sched.add_date_job(print_reservation_id, start_time, \
		name=job_name + '_start', args=[reservation_id])

	print "====> adding later job"

	start_instance_job = sched.add_date_job(print_reservation_id, later, \
		name=job_name + '_later', args=[reservation_id])

	print "====> Reservation id should print in 3 seconds, sleeping..."

	sleep(3)

	print "====> Printing jobs..."
	print sched.print_jobs()
{'fraction_non_alphanumeric': 0.13343055049216188, 'fraction_numerical': 0.004374772147283996, 'mean_word_length': 5.80893300248139, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '947146', 'n_tokens_mistral': 996, 'n_tokens_neox': 933, 'n_words': 197}