Notify complete from Piscal to LeafWeb
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using LeafWeb.Core.Entities;
|
||||
using LeafWeb.Core.Remote;
|
||||
@@ -11,10 +12,14 @@ namespace LeafWeb.Web.Services.PiscalQueue
|
||||
public class PiscalService
|
||||
{
|
||||
private readonly IPiscalClient _piscalClient;
|
||||
private readonly string _notifyCompleteUrl;
|
||||
|
||||
public PiscalService(IPiscalClient piscalClient)
|
||||
{
|
||||
_piscalClient = piscalClient;
|
||||
_notifyCompleteUrl =
|
||||
ConfigurationManager.AppSettings["LeafWebUrl"] +
|
||||
ConfigurationManager.AppSettings["PiscalNotifyCompleteUrlPath"];
|
||||
}
|
||||
|
||||
public PiscalService() : this(new PiscalSshClient(ConfigurationManager.ConnectionStrings["PiscalServer"].ConnectionString))
|
||||
@@ -24,6 +29,10 @@ namespace LeafWeb.Web.Services.PiscalQueue
|
||||
public void Run(LeafInput leafInput)
|
||||
{
|
||||
var inputFile = new PiscalLeafInput(leafInput);
|
||||
|
||||
if (!string.IsNullOrEmpty(_notifyCompleteUrl))
|
||||
inputFile.NotifyCompleteUrl = _notifyCompleteUrl;
|
||||
|
||||
// TODO: remove this, just for testing
|
||||
if (string.Equals(leafInput.Email, "james.kolpack@gmail.com", StringComparison.InvariantCultureIgnoreCase))
|
||||
inputFile.SuppressStorageCopy = true;
|
||||
|
||||
Reference in New Issue
Block a user