[gold-users] gdeposit and new allocation description

Kevin Van Workum vanw at sabalcore.com
Wed Dec 21 10:56:51 MST 2011


Scott,

It seems to be fine when not passing in a description, but it would be wise
to do as you suggest.

I also agree that clobbering the description of an existing allocation via
gdeposit would not be very user friendly. But I do think a way to set the
allocation's description when it is created via gdeposit is a desirable
feature. Maybe a new option to gdeposit (-D) that allows you to update the
allocation's description for new or existing allocations would work well.

Kevin

On Wed, Dec 21, 2011 at 12:13 PM, Scott Jackson <
scottmo at adaptivecomputing.com> wrote:

> Kevin,
>
> The only problem you might run into is what is it going to do if you do
> not pass in a description? Is it going to have a problem with an
> unitialized value? I would  probably only add the assignment if it is
> non-null/non-empty. You might also want to consider whether you want to add
> it to the case where you are depositing to an existing allocation to
> clobber the previous value. My thinking around this has been that any
> number of transactions might affect a single allocation (deposits,
> withdrawals, transfers, etc.) and that if they have descriptions for the
> transaction, they should go on the transaction instead of clobbering the
> description on the allocation. However, admittedly there is not an easy way
> to set the description when an allocation is created via a deposit (since I
> have disabled Allocation Create).
>
> Scott
>
>
> ------------------------------
>
> *From: *"Kevin Van Workum" <vanw at sabalcore.com>
> *To: *"gold-users" <gold-users at supercluster.org>
> *Sent: *Wednesday, December 21, 2011 7:58:43 AM
> *Subject: *[gold-users] gdeposit and new allocation description
>
>
> When using gdeposit to make a new allocation, I would like the new
> allocation's Description to be the description provided to gdeposit via the
> -d option. Currently the new allocation has no description, only the
> deposit's transaction. I have modified Bank.pm to do this, but was
> wondering if you could foresee any problems with this change? So far it
> seems to be working, but I haven't done anything close to a full test.
>
> [root at jman Gold]# diff -c Bank.pm.orig Bank.pm
> *** Bank.pm.orig        2011-12-21 09:52:46.000000000 -0500
> --- Bank.pm     2011-12-21 09:50:39.000000000 -0500
> ***************
> *** 4635,4640 ****
> --- 4635,4641 ----
>       my $database    = $request->getDatabase();
>       my $dbh         = $database->{_handle};
>       my $amount      = $request->getOptionValue("Amount");
> +     my $description = $request->getOptionValue("Description");
>       my $id          = $request->getOptionValue("Id");
>       my $allocation  = $request->getOptionValue("Allocation");
>       my $creditLimit = $request->getOptionValue("CreditLimit") || 0;
> ***************
> *** 4946,4951 ****
> --- 4947,4956 ----
>                           value => $creditLimit
>                       ),
>                       new Gold::Assignment(
> +                       name  => "Description",
> +                       value => $description
> +                     ),
> +                     new Gold::Assignment(
>                           name  => "Active",
>                           value => $activeness
>                       )
>
> --
> Kevin Van Workum, PhD
> Sabalcore Computing Inc.
> Run your code on 500 processors.
> Sign up for a free trial account.
> www.sabalcore.com
> 877-492-8027 ext. 11
>
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
>
>
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
>
>


-- 
Kevin Van Workum, PhD
Sabalcore Computing Inc.
Run your code on 500 processors.
Sign up for a free trial account.
www.sabalcore.com
877-492-8027 ext. 11
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/gold-users/attachments/20111221/e93092b6/attachment.html 


More information about the gold-users mailing list