+ q = get_policy_queue('new', session)
+
+ u.move_to_queue(q)
+ chg.in_queue_id = q.policy_queue_id
+ session.add(chg)
+ session.commit()
+
+ print "Sending new ack."
+ template = os.path.join(cnf["Dir::Templates"], 'process-unchecked.new')
+ u.update_subst()
+ u.Subst["__SUMMARY__"] = summary
+ new_ack_message = utils.TemplateSubst(u.Subst, template)
+ utils.send_mail(new_ack_message)
+
+################################################################################
+
+# FIXME: queues should be able to get autobuild
+# the current logic doesnt allow this, as buildd stuff is AFTER accept...
+# embargo/disembargo use a workaround due to this
+# q-unapproved hax0ring
+QueueInfo = {
+ "new": { "is": is_new, "process": acknowledge_new },
+ "autobyhand" : { "is" : is_autobyhand, "process": do_autobyhand },
+ "byhand" : { "is": is_byhand, "process": do_byhand },
+ "embargoed" : { "is": is_embargo, "process": do_embargo },
+ "unembargoed" : { "is": is_unembargo, "process": do_unembargo },
+}
+
+def determine_target(u):
+ cnf = Config()
+
+ # Statically handled queues
+ target = None
+
+ for q in ["autobyhand", "byhand", "new", "unembargoed", "embargoed"]:
+ if QueueInfo[q]["is"](u):
+ target = q
+ break
+
+ return target
+
+###############################################################################